package com.ruoyi.shop.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.BqMapper;
import com.ruoyi.shop.domain.Bq;
import com.ruoyi.shop.service.IBqService;

/**
 * 标签Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-20
 */
@Service
public class BqServiceImpl implements IBqService 
{
    @Autowired
    private BqMapper bqMapper;

    /**
     * 查询标签
     * 
     * @param bqId 标签主键
     * @return 标签
     */
    @Override
    public Bq selectBqByBqId(Long bqId)
    {
        return bqMapper.selectBqByBqId(bqId);
    }

    /**
     * 查询标签列表
     * 
     * @param bq 标签
     * @return 标签
     */
    @Override
    public List<Bq> selectBqList(Bq bq)
    {
        return bqMapper.selectBqList(bq);
    }

    /**
     * 新增标签
     * 
     * @param bq 标签
     * @return 结果
     */
    @Override
    public int insertBq(Bq bq)
    {
        //bq.setCreateTime(DateUtils.getNowDate());
        return bqMapper.insertBq(bq);
    }

    /**
     * 修改标签
     * 
     * @param bq 标签
     * @return 结果
     */
    @Override
    public int updateBq(Bq bq)
    {
        bq.setUpdateTime(DateUtils.getNowDate());
        return bqMapper.updateBq(bq);
    }

    /**
     * 批量删除标签
     * 
     * @param bqIds 需要删除的标签主键
     * @return 结果
     */
    @Override
    public int deleteBqByBqIds(Long[] bqIds)
    {
        return bqMapper.deleteBqByBqIds(bqIds);
    }

    /**
     * 删除标签信息
     * 
     * @param bqId 标签主键
     * @return 结果
     */
    @Override
    public int deleteBqByBqId(Long bqId)
    {
        return bqMapper.deleteBqByBqId(bqId);
    }
}
